<include file="public@header"/>
</head>
<body>
<div class="layui-fluid js-check-wrap">
    <form class="js-ajax-form" action="{:url('NavMenu/listOrder')}" method="post">
        <div class="layui-card">
            <div class="layui-card-header well">
                <div class="layui-col-xs6">
                    <h3>{:lang('ADMIN_NAVMENU_INDEX')}</h3>
                </div>
                <div class="layui-col-xs6 text-right">
                    <if condition="cmf_auth_check(cmf_get_current_admin_id(), 'admin/NavMenu/add')">
                        <!-- 添加 -->
                        <a href="{:url('NavMenu/add',['nav_id'=>$nav_id])}" class="layui-btn layui-btn-normal">
                        {:lang('ADMIN_NAVMENU_ADD')}</a>
                    </if>
                    <if condition="cmf_auth_check(cmf_get_current_admin_id(), 'admin/NavMenu/listOrder')">
                        <button class="layui-btn layui-btn-warm js-ajax-submit" type="submit">{:lang('SAVE_SORT')}</button>
                    </if>
                </div>
            </div>

            <div class="layui-card-body">
                <table class="layui-table">
                    <thead>
                    <tr>
                        <th width="60" class="text-center">{:lang('SORT')}</th>
                        <th width="50">ID</th>
                        <th>菜单名称</th>
                        <th width="80">状态</th>
                        <th width="195">{:lang('ACTIONS')}</th>
                    </tr>
                    </thead>
                    <tbody>
                    {$categories}
                    </tbody>
                </table>
            </div>
        </div>
    </form>
    
</div>

<script src="__STATIC__/js/admin.js"></script>
</body>
</html>
